package com.interesting.client.UI.commonActivity;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.interesting.R;

public class OnlineVideoActivity extends Activity {
	
	private WebView mWebView;


	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_online_video);
		
		
		mWebView = (WebView)findViewById(R.id.webview);
        mWebView.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY);
        mWebView.getSettings().setJavaScriptEnabled(true);
        mWebView.getSettings().setPluginsEnabled(true);
        mWebView.loadUrl("http://3g.youku.com");
        mWebView.setWebViewClient(new WebViewClient() {
            @Override
            public void onPageFinished(WebView view, String url) {
            };

            /** 页面跳转 */
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
//                    Intent intent = new Intent(getActivity(), VideoPlayerActivity.class);
//                    intent.putExtra("path", url);
//                    startActivity(intent);
                    return true;
            };
        });

	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.online_video, menu);
		return true;
	}

}

